package o;

import android.content.res.AssetManager;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import androidx.annotation.NonNull;
import java.io.InputStream;

public class vb<Data> implements vk<Uri, Data> {
    private static final int ˏ = "file:///android_asset/".length();
    private final AssetManager ˊ;
    private final b<Data> ˎ;

    public interface b<Data> {
        sg<Data> ॱ(AssetManager assetManager, String str);
    }

    public static class a implements vr<Uri, InputStream>, b<InputStream> {
        private final AssetManager ˎ;

        public a(AssetManager assetManager) {
            this.ˎ = assetManager;
        }

        @NonNull
        public vk<Uri, InputStream> ˏ(vo voVar) {
            return new vb(this.ˎ, this);
        }

        public void ॱ() {
        }

        public sg<InputStream> ॱ(AssetManager assetManager, String str) {
            return new su(assetManager, str);
        }
    }

    public static class c implements vr<Uri, ParcelFileDescriptor>, b<ParcelFileDescriptor> {
        private final AssetManager ˊ;

        public c(AssetManager assetManager) {
            this.ˊ = assetManager;
        }

        @NonNull
        public vk<Uri, ParcelFileDescriptor> ˏ(vo voVar) {
            return new vb(this.ˊ, this);
        }

        public void ॱ() {
        }

        public sg<ParcelFileDescriptor> ॱ(AssetManager assetManager, String str) {
            return new so(assetManager, str);
        }
    }

    public /* synthetic */ boolean ˋ(@NonNull Object obj) {
        return ˏ((Uri) obj);
    }

    public /* synthetic */ o.vk.c ˎ(@NonNull Object obj, int i, int i2, @NonNull sc scVar) {
        return ˊ((Uri) obj, i, i2, scVar);
    }

    public vb(AssetManager assetManager, b<Data> bVar) {
        this.ˊ = assetManager;
        this.ˎ = bVar;
    }

    public o.vk.c<Data> ˊ(@NonNull Uri uri, int i, int i2, @NonNull sc scVar) {
        return new o.vk.c(new aai(uri), this.ˎ.ॱ(this.ˊ, uri.toString().substring(ˏ)));
    }

    public boolean ˏ(@NonNull Uri uri) {
        if ("file".equals(uri.getScheme()) && !uri.getPathSegments().isEmpty() && "android_asset".equals(uri.getPathSegments().get(0))) {
            return true;
        }
        return false;
    }
}
